<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="p" uri="/WEB-INF/pages.tld"%>  
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
	String webContext = request.getContextPath();
%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>赠品列表</title>
</head>
<script type="text/javascript"> 
	var msg="${requestScope.tipMessage}";
	if(msg!=""){
	alert(msg);
	}

	function del(id){
		
	}
</script>
<body>
	<s:form action="saveGift" method="post" theme="simple">
		<table width="40%">
			<tr>
				<td colspan="4" align="center" style="font-weight:bolder;background: lightgray;">新增赠品</td>
			</tr>
			<tr>
				<td align="right" style="font-weight:bolder">U9对应料号:</td>
				<td><s:textfield name="titemCodeU9" /></td>
				<td align="right" style="font-weight:bolder">赠品名称:</td>
				<td><s:textfield name="tname" /></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td align="right" style="font-weight:bolder"><s:submit value="保存"></s:submit></td>
			</tr>
		</table>
	</s:form>
	<br></br>
	<table  border="1" align="center" width="95%">
		<tr align="center" style="font-weight:bolder">
			<td width="40px" style="background: lightgray;">序号</td>
			<td width="250px" style="background: lightgray;">U9对应料号</td>
			<td style="background: lightgray;">赠品名称</td>
			<td width="150px" style="background: lightgray;">是否可用</td>
			<td width="200px" style="background: lightgray;">操作</td>
		</tr>
		<s:iterator value="giftList" id="tgift" status="index" >
			<tr>
				<td><s:property value="#index.index+1"/></td>   
		    	<td><s:property value="itemCodeU9" /></td>
		    	<td><s:property value="name" />&nbsp;</td>     
		    	<td><s:if test="isUsed==1">不可用</s:if><s:else>可用</s:else></td>
		    	<td align="center"><a href="" onclick="del(<s:property value="id" />)">删除</a> </td>
		    </tr> 
		</s:iterator>  
	</table>
	
</body>
</html>